Test an Update Procedure
This page last changed on Nov 28, 2008.
Oracle Data Service Integrator Documentation > Data Services Developer's Guide How To Test an Update ProcedureThis topic describes how to test an Update procedure in Test view in Workshop for WebLogic. Configure Audit PropertiesTo test an Update procedure in Workshop for WebLogic, you must submit a data graph in the Parameters box in Test view. A data graph is an XML structure with a root element of <sdo:datagraph> and a <changesummary> element. The easiest way to submit a data graph is to capture one from an audit. First, configure audit properties in the Oracle Data Service Integrator Console. Configuring Audit Properties in the Oracle Data Service Integrator ConsoleTo configure audit properties so that Oracle Data Service Integrator generates data graphs:
Capture the Data GraphYou can then capture a data graph from the audit messages displayed in the Workshop for WebLogic Console tab, and edit the data graph to submit to the Update procedure in Test view. Viewing a Data Graph in the Workshop for WebLogic Console TabTo capture a data graph:
Submit the UpdateWhen you update relational sources, the SDO update mechanism uses optimistic locking to avoid change conflicts. With optimistic locking, the data source is not locked when the SDO client acquires the data. Later, when the client wants to update, the data in the source is compared to a copy of the data at a time when it was acquired. If there are discrepancies, the update is not committed. Before you submit the data graph to the Update procedure, be sure that optimistic locking is enabled in the underlying data source you are updating. You can then submit the data graph to the Update procedure. However, you may need to edit it, as the data graph you captured from the Workshop for WebLogic Console tab reflected the last change you made, not the change you are presently submitting to the Update procedure. Submitting the Data Graph to the Update ProcedureThe data graph you submit to the Update procedure takes the place of the return type as an argument, even if you are updating only some of the elements in the return type. To submit the data graph to an Update procedure:
<sdo:datagraph xmlns:sdo="commonj.sdo"> <changeSummary> <sim:SIMPLE_CUSTOMER sdo:ref="#/sdo:datagraph/sim:SIMPLE_CUSTOMER" xmlns:sim="ld:logical/SimpleCustomer"> <CUSTOMER_SINCE>1999-01-01T00:00:00</CUSTOMER_SINCE> </sim:SIMPLE_CUSTOMER> </changeSummary> <sim:SIMPLE_CUSTOMER xmlns:sim="ld:logical/SimpleCustomer"> <CUSTOMER_ID>CUSTOMER7</CUSTOMER_ID> <CUSTOMER_SINCE>2007-11-11T00:00:00</CUSTOMER_SINCE> </sim:SIMPLE_CUSTOMER> </sdo:datagraph> This version has been updated in the Parameters box (note the difference in the CUSTOMER_SINCE dates): <sdo:datagraph xmlns:sdo="commonj.sdo"> <changeSummary> <sim:SIMPLE_CUSTOMER sdo:ref="#/sdo:datagraph/sim:SIMPLE_CUSTOMER" xmlns:sim="ld:logical/SimpleCustomer"> <CUSTOMER_SINCE>2007-11-11T00:00:00</CUSTOMER_SINCE> </sim:SIMPLE_CUSTOMER> </changeSummary> <sim:SIMPLE_CUSTOMER xmlns:sim="ld:logical/SimpleCustomer"> <CUSTOMER_ID>CUSTOMER7</CUSTOMER_ID> <CUSTOMER_SINCE>2008-04-04T00:00:00</CUSTOMER_SINCE> </sim:SIMPLE_CUSTOMER> </sdo:datagraph>
See AlsoConcepts
How Tos |
Document generated by Confluence on Jan 13, 2009 15:57 |